package server.controller;

import com.google.common.collect.Lists;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import plug.result.RetResponse;
import plug.result.RetResult;
import server.dao.UsersDao;
import server.model.entity.Users;
import server.service.MenuService;
import server.tool.tool.BeanUtil;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 创建人:    xvzhe
 * 创建时间:
 * 修改时间:
 * 版本:      v1.0
 */
@RestController
@RequestMapping("v1/api")
public class MenuController {
    @Autowired
    private MenuService menuService;
    @Autowired
    private UsersDao usersDao;

    @CrossOrigin(origins = "*")
    @GetMapping("/menu/{userId}")
    public RetResult findAll(@PathVariable String userId) {
        return menuService.findAll(userId);
    }
}
